Skip to main content

Roll Back Transaction

AutomatR.OracleDB.Database.RollBackTransaction

The "Roll Back Transaction" activity in AutomatR for Oracle databases is designed to roll back a transaction, reverting any changes made within the transaction and ensuring data consistency. This activity is particularly useful when there is a need to undo the effects of a transaction in case of errors or other exceptional scenarios.

Properties

NameDescription
Misc
Display NameProvides a customizable name for the activity displayed in the workflow. The display name enhances clarity and organization within the automation project. String variables containing the desired display name.
Optional
DelaySpecifies the amount of time (in seconds) to wait before executing the "Roll Back Transaction" activity. This can be useful for handling synchronization issues. Integer variables containing the delay duration. Ex.: If the amount of time is 1000 milliseconds or 1 sec, i.e., 1.

How to use:

  1. Drag and drop the "Roll Back Transaction" activity onto the workflow.
  2. Ensure that this activity is placed within the scope of a "Start Transaction" activity. This ensures that the rollback operation is associated with the correct transaction.
  3. Optionally, configure the delay.
  4. Execute the workflow to roll back the ongoing database transaction.

Note:

  • The "Roll Back Transaction" activity should be used within the scope of a "Start Transaction" activity. It is designed to work with the transaction initiated by the "Start Transaction" activity.
  • Rolling back a transaction undoes all changes made during that transaction, reverting the database to its state before the transaction began.

Example: Consider an example where the "Roll Back Transaction" activity is used within a transactional scope to roll back changes if an error occurs:

Start Transaction:
Connection: oracleConnectionVariable
Transaction: transactionVariable

// Perform database operations within the transaction scope

If (Error Condition):
Roll Back Transaction:
Delay: 0 // No delay

In this example, the "Roll Back Transaction" activity is used within a transactional scope. If an error condition occurs within the scope, the transaction is rolled back, ensuring that any changes made within the transaction are undone.